//------------------------------------------------
//		main.c
//	ADC Example
//	Arthur Benemann 28/03/2012
//------------------------------------------------
//	Description:
//  ADC 
//------------------------------------------------

#include "picDev.h"     // Hardware Definitions
#include "ADC/ADC.h"    // ADC library
#include "UART/UART2.h" // UART library
#include "DELAY/DELAY.h"
//-------------------- Main -----------------------
int main() {
    initU2();                       // Initialize the Uart module
    initADC();                      // Initialize the ADC module

    putsU2("ADC example.\r\n");     // Send's some welcome string.

    // Main Loop
    while (1) {
        putU2(readADC(0)& 0x00ff);   // Read the ADC, and send the truncated value
        delayms(10);                // Loop Delay
    };
}



